import fly from '../utils/request'

// 详情
export const getdetails = (id) => {
    return fly.get(`/articles/${id}`)
}
// 获取评论
export const getComments = (data) => {
    return fly.get('/comments',data)
}
// 收藏文章
export const getCollection = (data) => {
    return fly.post('/article/collections',data)
}
// 取消收藏
export const cancelCollection = (id) => {
    return fly.delete(`/article/collections/${id}`)
}
// 关注用户
export const focusUsers = (data) => {
    return fly.post('/user/followings',data)
}
// 取消关注
export const cancelUsers = (id) => {
    return fly.delete(`/user/followings/${id}`)
}
// 添加评论或评论回复
export const addpl = (data) => {
    return fly.post('/comments',data)
}
